# Maintainer: taotieren <admin@taotieren.com>

pkgname=python-pyopenjtalk
_name=${pkgname#python-}
pkgver=0.4.1
pkgrel=2
epoch=
pkgdesc="A python wrapper for OpenJTalk"
arch=($CARCH)
url="https://pypi.org/project/${_name}"
license=(MIT)
groups=()
provides=(${pkgname})
conflicts=(${pkgname})
depends=(
    gcc-libs
    glibc
    python
    python-importlib_resources
    python-tqdm
    # AUR
    python-marine
)
makedepends=(
    cmake
    cython
    python-flake8
    python-build
    python-installer
    python-wheel
    python-setuptools
    python-setuptools-scm
    # AUR
    python-cmake
)
optdepends=()
options=('!strip' '!debug')
source=("${_name}-${pkgver}.tar.gz::https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
noextract=()
sha256sums=('d5ada46f7fc2b52c1c79c273eb9668ff6ad7ab276a8db9d8be119ef93440f0dc')

build() {
    cd "${srcdir}/${_name}-${pkgver}"
    python -m build --wheel --no-isolation
}

package() {
    cd "${srcdir}/${_name}-${pkgver}"
    python -m installer --destdir="${pkgdir}" dist/*.whl
    install -Dm0644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}
